perm filename SAIL.XGP[DOC,AIL]1 blob sn#088649 filedate 1974-03-01 generic text, type T, neo UTF8


␈↓STANFORD ARTIFICIAL INTELLIGENCE LABORATORY␈↓ 
-MARCH 1974






␈↓↓␈↓ ¬	SAIL USER MANUAL

␈↓␈↓ ε∀UPDATE



␈↓␈↓ ¬wJames R. Low
␈↓␈↓ ¬pHanan J. Samet
␈↓␈↓ ¬`Robert F. Sproull
␈↓␈↓ ¬ODaniel C. Swinehart
␈↓␈↓ ¬`Russell H. Taylor
␈↓␈↓ ¬bKurt A. VanLehn










␈↓␈↓ εβABSTRACT

␈↓This␈α
document␈α
describes␈α
recent␈α
changes␈α
to␈α
the␈α
SAIL␈α
language␈α
since␈α
the␈α
"new"␈α∞manual␈α
(AIM-204)
␈↓was␈α
published␈α
in␈α∞July␈α
1973.␈α
 It␈α
reflects␈α∞the␈α
various␈α
new␈α
features␈α∞implemented␈α
as␈α
of␈α∞12␈α
February,
␈↓1974␈αfor␈αSAIL␈αversion␈α7␈αand␈αcorrects␈αa␈αnumber␈αof␈αminor␈αerrors␈αin␈αthe␈αearlier␈αmanual.
␈↓SAIL Addendum  1␈↓ 	≡TABLE OF CONTENTS


␈↓  
␈↓␈↓ βt␈↓↓T A B L E   O F   C O N T E N T S␈↓



␈↓␈↓ β8SECTION␈↓ 	≤PAGE



␈↓␈↓ β81␈↓ ∧λINTRODUCTION␈↓ 	Z1



␈↓␈↓ β82␈↓ ∧λNUMERICAL ROUTINES␈↓ 	Z2

␈↓␈↓ β8␈↓ ∧λ1␈↓ ∧XOVERFLOW␈↓ 	Z3
␈↓␈↓ β8␈↓ ∧λ2␈↓ ∧XENTRY POINTS␈↓ 	Z3


␈↓␈↓ β83␈↓ ∧λNEW PROCESS FEATURES␈↓ 	Z4

␈↓␈↓ β8␈↓ ∧λ1␈↓ ∧XSPROUT APPLY␈↓ 	Z4
␈↓␈↓ β8␈↓ ∧λ2␈↓ ∧XSPROUT_DEFAULTS␈↓ 	Z4
␈↓␈↓ β8␈↓ ∧λ3␈↓ ∧XSUSPEND␈↓ 	Z6
␈↓␈↓ β8␈↓ ∧λ4␈↓ ∧XFAIL AND SUCCEED␈↓ 	Z6


␈↓␈↓ β84␈↓ ∧λERROR HANDLING␈↓ 	Z7

␈↓␈↓ β8␈↓ ∧λ1␈↓ ∧XERROR MODES␈↓ 	Z7
␈↓␈↓ β8␈↓ ∧λ2␈↓ ∧XUSER ERROR PROCEDURES␈↓ 	Z7


␈↓␈↓ β85␈↓ ∧λINEXHAUSTIBLE STRING SPACE␈↓ 	Z9
␈↓SAIL Addendum  1␈↓ 	≡TABLE OF CONTENTS


␈↓␈↓ β86␈↓ ∧λMISCELLANEOUS NEW FEATURES␈↓ 	L11

␈↓␈↓ β8␈↓ ∧λ1␈↓ ∧XNEW MTAPE OPTIONS␈↓ 	L11
␈↓␈↓ β8␈↓ ∧λ2␈↓ ∧XINITIALIZATION PHASES␈↓ 	L11
␈↓␈↓ β8␈↓ ∧λ3␈↓ ∧XCHNCDB␈↓ 	L12
␈↓␈↓ β8␈↓ ∧λ4␈↓ ∧XARRCLR␈↓ 	L12
␈↓␈↓ β8␈↓ ∧λ5␈↓ ∧XSETPL␈↓ 	L12
␈↓␈↓ β8␈↓ ∧λ6␈↓ ∧XEVALREDEFINE␈↓ 	L13
␈↓␈↓ β8␈↓ ∧λ7␈↓ ∧XCVPS␈↓ 	L13
␈↓␈↓ β8␈↓ ∧λ8␈↓ ∧XEXPRESSIONS IN REQUIRES␈↓ 	L13
␈↓␈↓ β8␈↓ ∧λ9␈↓ ∧XRELEASE␈↓ 	L13
␈↓␈↓ β8␈↓ ∧λ10␈↓ ∧XTTYUP␈↓ 	L13
␈↓␈↓ β8␈↓ ∧λ11␈↓ ∧XBREAKSET MODES "K" AND "F"␈↓ 	L14
␈↓␈↓ β8␈↓ ∧λ12␈↓ ∧XINOUT␈↓ 	L14
␈↓␈↓ β8␈↓ ∧λ13␈↓ ∧XGETSTS & SETSTS␈↓ 	L14
␈↓␈↓ β8␈↓ ∧λ14␈↓ ∧XCHANGES TO "OPEN" ERROR HANDLING␈↓ 	L15
␈↓␈↓ β8␈↓ ∧λ15␈↓ ∧XASH␈↓ 	L15
␈↓␈↓ β8␈↓ ∧λ16␈↓ ∧XARG_LIST␈↓ 	L15


␈↓␈↓ β87␈↓ ∧λMINOR CORRECTIONS TO AIM-204␈↓ 	L16
␈↓SAIL Addendum  1␈↓ 	uINTRODUCTION


␈↓␈↓ ¬↑␈↓↓SECTION  1␈↓

␈↓␈↓ ¬1␈↓↓INTRODUCTION␈↓





␈↓The␈αfollowing␈αshort␈αmanual␈αdescribes␈αthe␈αchanges␈αthat␈αhave␈αhappened␈αto␈αSAIL␈αsince␈αthe␈αpublishing
␈↓of␈α
the␈α
Manual␈α
in␈α
July␈α
1973.␈αIt␈α
accurately␈α
reflects␈α
the␈α
state␈α
of␈αSAIL,␈α
version␈α
7,␈α
which␈α
was␈α
put␈αup
␈↓on␈α⊃December␈α∩4,␈α⊃1973.␈α∩ The␈α⊃reader␈α⊃should␈α∩be␈α⊃warned␈α∩that␈α⊃many␈α⊃of␈α∩these␈α⊃new␈α∩features␈α⊃were
␈↓designed␈αfor␈αveteran␈αSAIL␈αhackers.

␈↓The␈αreader␈αmay␈αalso␈αwant␈αto␈αrefer␈αto␈αthe␈αfollowing␈αdocuments,␈αwhich␈αare␈αusually␈αkept␈αupdated.

␈↓MACLIE.WRU[DOC,AIL]␈↓ ∧λA␈α
summary␈α
of␈α
commonly␈αmade␈α
errors␈α
when␈α
using␈αmacros␈α
and␈α
what␈α
to␈αdo
␈↓␈↓ ∧λabout␈αthem.

␈↓TUTOR.DOC[DOC,AIL]␈↓ ∧λIn␈αintroduction␈αto␈αLEAP.

␈↓LEAP.WRU[DOC,AIL]␈↓ ∧λA␈αdetailed␈αdescription␈αof␈αthe␈αruntime␈αenvironment␈αof␈αLEAP␈αfor␈αthe␈αhardy
␈↓␈↓ ∧λfew␈αwho␈αwant␈αto␈αinterface␈αto␈αLEAP␈αin␈αassembly␈αlanguage.

␈↓SAIL.DOC[AIM,DOC]␈↓ ∧λThe␈α
July␈α
'73␈α∞manual␈α
(AIM-204)␈α
in␈α
LPT␈α∞form.␈α
Warning:␈α
this␈α
version␈α∞is␈α
the
␈↓␈↓ ∧λStanford␈α∞character␈α∞set.␈α∞ It␈α∂is␈α∞also␈α∞almost␈α∞300␈α∂pages␈α∞long.␈α∞ You␈α∞can␈α∂get␈α∞a
␈↓␈↓ ∧λ120␈α∩page␈α∩version,␈α∩set␈α∩in␈α∩two␈α∩columns␈α∩of␈α∩nice␈α∩type␈α∩from␈α∩the␈α⊃National
␈↓␈↓ ∧λTechnical␈αInformation␈αService,␈αSpringfield,␈αVirginia␈α22151.

␈↓LIES[DOC,AIL]␈↓ ∧λThis␈α∩file␈α⊃contains␈α∩the␈α⊃know␈α∩mistakes␈α⊃in␈α∩the␈α⊃Manual.␈α∩Soon␈α⊃it␈α∩will␈α⊃also
␈↓␈↓ ∧λcontain␈αthe␈αknown␈αmistakes␈αin␈αthis␈αdocument.















␈↓␈↓ εP␈↓ X␈↓␈↓ εP␈↓ X␈↓␈↓ εP␈↓ X␈↓␈↓ εI1␈↓ X
␈↓SAIL Addendum  1␈↓ 	∩NUMERICAL ROUTINES


␈↓␈↓ ¬↑␈↓↓SECTION  2␈↓

␈↓␈↓ ∧i␈↓↓NUMERICAL ROUTINES␈↓





␈↓A␈α∪collection␈α∪of␈α∩numerical␈α∪routines␈α∪has␈α∪been␈α∩added␈α∪to␈α∪SAIL.␈α∩ These␈α∪are␈α∪pre-declared␈α∪in␈α∩the
␈↓compiler,␈α∪and␈α∪are␈α∪loaded␈α∪from␈α∪the␈α∩standard␈α∪SAIL␈α∪library.␈α∪ The␈α∪functions␈α∪are␈α∪quite␈α∩standard;
␈↓following␈αare␈αthe␈αequivalent␈αdefinitions:

␈↓1.␈↓ αλThe␈α⊂standard␈α⊂trigonometric␈α⊃functions.␈α⊂ ASIN,␈α⊂ACOS,␈α⊂ATAN␈α⊃and␈α⊂ATAN2␈α⊂return␈α⊃results␈α⊂in
␈↓␈↓ αλradians.␈α
 The␈α
ATAN2␈αcall␈α
takes␈α
arc-tangent␈αof␈α
the␈α
quotient␈αof␈α
its␈α
arguments;␈αin␈α
this␈α
way,␈αit
␈↓␈↓ αλcorrectly␈αpreserves␈αsign␈αinformation.

␈↓        REAL PROCEDURE SIN (REAL RADIANS);
␈↓        REAL PROCEDURE COS (REAL RADIANS);
␈↓        REAL PROCEDURE SIND (REAL DEGREES);
␈↓        REAL PROCEDURE COSD (REAL DEGREES);

␈↓        REAL PROCEDURE ASIN (REAL ARGUMENT);
␈↓        REAL PROCEDURE ACOS (REAL ARGUMENT);
␈↓        REAL PROCEDURE ATAN (REAL ARGUMENT);
␈↓        REAL PROCEDURE ATAN2 (REAL NUMERATOR,DENOMINATOR);


␈↓2.␈↓ αλThe␈αhyperbolic␈αtrigonometric␈αfunctions.

␈↓        REAL PROCEDURE SINH (REAL ARGUMENT);
␈↓        REAL PROCEDURE COSH (REAL ARGUMENT);
␈↓        REAL PROCEDURE TANH (REAL ARGUMENT);

␈↓3. ␈↓ αλThe␈αsquare-root␈αfunction:

␈↓        REAL PROCEDURE SQRT (REAL ARGUMENT);

␈↓4.␈↓ αλA␈αpseudo-random␈αnumber␈αgenerator.␈α The␈αargument␈αspecifies␈αa␈αnew␈αvalue␈αfor␈αthe␈αseed␈α(If␈αthe
␈↓␈↓ αλargument␈α∩is␈α∩0,␈α∩the␈α∪old␈α∩seed␈α∩value␈α∩is␈α∩used.␈α∪ Thus␈α∩to␈α∩get␈α∩differing␈α∩random␈α∪numbers,␈α∩this
␈↓␈↓ αλargument␈αshould␈αbe␈αzero.)␈α Results␈αare␈αnormalized␈αto␈αlie␈αin␈αthe␈αrange␈α[0,1].

␈↓        REAL PROCEDURE RAN (INTEGER SEED);



␈↓␈↓ εI2␈↓ X
␈↓SAIL Addendum  1␈↓ 	∩NUMERICAL ROUTINES


␈↓5.␈↓ αλLogarithm␈α⊃and␈α⊃exponentiation␈α⊃functions.␈α⊃ These␈α⊃functions␈α⊃are␈α⊃the␈α⊃same␈α⊃ones␈α⊃used␈α⊃by␈α⊂the
␈↓␈↓ αλSAIL␈α
exponentiation␈α∞operator.␈α
 The␈α
base␈α∞is␈α
e␈α
(2.71828182845904).␈α∞ The␈α
logarithm␈α
to␈α∞the␈α
base
␈↓␈↓ αλ10␈αof␈αe␈αis␈α.4342944819.

␈↓        REAL PROCEDURE LOG (REAL ARGUMENT);
␈↓        REAL PROCEDURE EXP (REAL ARGUMENT);

␈↓These␈αfunctions␈αmay␈αoccasionally␈αbe␈αasked␈αto␈αcompute␈αnumbers␈αthat␈αlie␈αoutside␈αthe␈αrange␈αof␈αlegal
␈↓floating-point␈αnumbers␈αon␈αthe␈αPDP-10.␈α In␈αthese␈αcases,␈αthe␈αroutines␈αissue␈αsprightly␈αerror␈αmessages
␈↓that␈αare␈αcontinuable.



␈↓2.1␈α-␈α␈↓↓OVERFLOW␈↓


␈↓In␈α∂order␈α∂to␈α∂better␈α⊂perform␈α∂their␈α∂tasks,␈α∂these␈α∂routines␈α⊂enable␈α∂the␈α∂system␈α∂interrupt␈α⊂facility␈α∂for
␈↓floating-point␈αoverflow␈αand␈αunderflow␈αerrors.␈α If␈αan␈αunderflow␈αis␈αdetected,␈αthe␈αresults␈αare␈αset␈αto
␈↓0␈α∞(a␈α
feat␈α∞not␈α∞done␈α
by␈α∞the␈α∞PDP-10␈α
hardware,␈α∞alas).␈α∞ Be␈α
aware␈α∞that␈α∞such␈α
underflow␈α∞fixups␈α∞will␈α
be
␈↓done␈αto␈αevery␈αunderflow␈αthat␈αoccurs␈αin␈αyour␈αprogram.

␈↓If␈αyou␈αwould␈αlike␈αto␈αbe␈αinformed␈αof␈αany␈αnumerical␈αexceptions,␈αyou␈αcan␈αcall␈αthe␈αruntime:

␈↓        TRIGINI ( LOCATION(simple-procedure-name) );

␈↓Every␈α∪floating-point␈α∪exception␈α∪that␈α∪is␈α∪not␈α∪expected␈α∪by␈α∪the␈α∪interrupt␈α∪handler␈α∀(the␈α∪numerical
␈↓routines␈α∞use␈α∞a␈α∞special␈α∞convention␈α∞to␈α
indicate␈α∞that␈α∞arithmetic␈α∞exception␈α∞was␈α∞expected)␈α∞will␈α
cause
␈↓the␈α∪specified␈α∪simple␈α∩procedure␈α∪to␈α∪be␈α∪called.␈α∩ This␈α∪procedure␈α∪may␈α∩look␈α∪around␈α∪the␈α∪world␈α∩as
␈↓described␈α∞in␈α
the␈α∞Manual␈α∞for␈α
'export'␈α∞interrupt␈α∞handlers,␈α
page␈α∞79.␈α
 If␈α∞no␈α∞TRIGINI␈α
call␈α∞is␈α∞done,␈α
the
␈↓interrupt␈αroutine␈αwill␈αsimply␈αdismiss␈αunexpected␈αfloating-point␈αinterrupts.



␈↓2.2␈α
-␈α
␈↓↓ENTRY␈αPOINTS␈↓


␈↓In␈αorder␈αto␈αavoid␈αconfusion␈α(by␈αthe␈αloader)␈αwith␈αolder␈αtrig␈αpackages,␈αthe␈αentry␈αpoints␈αof␈αthe␈αSAIL
␈↓arithmetic␈α
routines␈α
all␈α
have␈α
a␈α
"$"␈α
appended␈α
to␈α
the␈α
end.␈α
 Thus,␈α
SIN␈α
has␈α
the␈α
entry␈α
point␈α∞SIN$,␈α
etc.
␈↓WARNING:␈αIf␈αa␈αprogram␈αplans␈αto␈αuse␈αthe␈αSAIL␈αintrinsic␈αnumerical␈αroutines,␈αit␈αshould␈αNOT␈αinclude
␈↓external␈αdeclarations␈αto␈αthem,␈αsince␈αthis␈αwill␈αprobably␈αcause␈αthe␈αFORTRAN␈αlibrary␈αroutines␈αto␈αbe
␈↓loaded.




␈↓␈↓ εI3␈↓ X
␈↓SAIL Addendum  1␈↓ λnNEW PROCESS FEATURES


␈↓␈↓ ¬↑␈↓↓SECTION  3␈↓

␈↓␈↓ ∧P␈↓↓NEW PROCESS FEATURES␈↓







␈↓3.1␈α
-␈α
␈↓↓SPROUT␈αAPPLY␈↓


␈↓The␈α<procedure␈αcall>␈αin␈αa␈αSPROUT␈αstatement␈αmay␈αbe␈αan␈αAPPLY␈αconstruct.␈α In␈α this␈αcase␈αSPROUT
␈↓will␈α∂ do␈α∂the␈α⊂"right"␈α∂thing␈α∂ about␈α∂setting␈α⊂up␈α∂the␈α∂static␈α∂link␈α⊂for␈α∂ the␈α∂APPLY.␈α∂That␈α⊂is,␈α∂"up-level"
␈↓references␈α
by␈α
the␈αprocess␈α
will␈α
be␈αmade␈α
to␈α
the␈α
same␈αvariable␈α
instances␈α
that␈αwould␈α
be␈α
used␈α
if␈αthe
␈↓APPLY␈αdid␈αnot␈αoccur␈αin␈αa␈αSPROUT␈αstatement.␈α(See␈αpage␈α77␈αof␈αthe␈αmanual.)

␈↓However,␈α
there␈α
is␈α
a␈α
glitch.␈α
The␈α
sprout␈α
mechanism␈α∞is␈α
not␈α
yet␈α
smart␈α
enough␈α
to␈α
find␈α
out␈α∞the␈α
block
␈↓of␈αthe␈α
declaration␈αof␈αthe␈α
procedure␈αused␈α
to␈αdefine␈αthe␈α
procedure␈αitem.␈α
It␈αwould␈αbe␈α
nice␈αif␈α
it␈αdid,
␈↓since␈αthen␈αit␈αcould␈αwarn␈αthe␈αuser␈αwhen␈αthat␈αblock␈αwas␈αexited␈αand␈αyet␈αthe␈αprocess␈αwas␈αstill␈αalive,
␈↓and␈α
thus␈α
potentially␈α
able␈α
to␈α
refer␈α
to␈α
deallocated␈α
arrays␈α
and␈α
etc.␈α
What␈α
the␈α
sprout␈α
does␈α∞instead␈α
is
␈↓assume␈α
the␈α
procedure␈α
was␈α
declared␈α
in␈α
the␈α
outer␈α
block.␈α
This␈α
may␈α
be␈α
fixed␈α
 eventually,␈α
but␈α
in␈α
the
␈↓meantime␈α⊂ some␈α⊂extra␈α⊂care␈α⊂should␈α∂be␈α⊂taken␈α⊂ when␈α⊂using␈α⊂ apply␈α∂in␈α⊂sprouts␈α⊂to␈α⊂ avoid␈α⊂ exiting␈α∂a
␈↓block␈α∞ with␈α∞dependents.␈α∞   Similarly,␈α∞be␈α∞warned␈α∞ that␈α∞the␈α∞"DEPENDENTS␈α∞(<blockid>)"␈α∞construct
␈↓may␈α∪ not␈α∪give␈α∪ the␈α∪ "right"␈α∪result␈α∪ for␈α∩ sprout␈α∪applies.␈α∪Page␈α∪68␈α∪of␈α∪the␈α∪Manual␈α∪contains␈α∩the
␈↓description␈αof␈αthis␈αprotection␈αmechanism␈αfor␈αnon-APPLY␈αSprouts.



␈↓3.2␈α-␈α␈↓↓SPROUT_DEFAULTS␈↓


␈↓SAIL␈α
 now␈α∞provides␈α
 a␈α∞mechanism␈α
 by␈α
which␈α∞ the␈α
user␈α∞ may␈α
specify␈α
 the␈α∞"default"␈α
options␈α∞to␈α
be
␈↓used␈αwhen␈αindividual␈αprocedures␈αare␈αsprouted.










␈↓␈↓ εI4␈↓ X
␈↓SAIL Addendum  1␈↓ λnNEW PROCESS FEATURES



␈↓αSyntax:
␈↓α        PROCEDURE <procid> ...
␈↓α         BEGIN
␈↓α         <some declarations>;
␈↓α         SPROUT_DEFAULTS <integer constant>;
␈↓α         <perhaps some more declarations>;
␈↓α         :
␈↓α         :
␈↓α         <statements>
␈↓α         :
␈↓α         END;


␈↓In␈αother␈αwords,␈αSPROUT_DEFAULTS␈αis␈αa␈αdeclaration.

␈↓Semantics:

␈↓If␈α⊃ one␈α⊂of␈α⊃the␈α⊃"allocation"␈α⊂fields␈α⊃of␈α⊃ the␈α⊂options␈α⊃word␈α⊂passed␈α⊃to␈α⊃the␈α⊂SPROUT␈α⊃routine␈α⊃--␈α⊂i.e.
␈↓QUANTUM,STRINGSTACK,PSTACK,␈α⊃or␈α⊃ PRIORITY␈α⊃--␈α⊃is␈α⊃zero,␈α⊃  then␈α⊃ SPROUT␈α⊃ will␈α∩look␈α⊃ at
␈↓the␈αcorresponding␈α field␈αof␈α the␈αspecified␈α<integer␈αconstant>␈αfor␈αthe␈αprocedure␈αbeing␈αsprouted.␈αIf
␈↓the␈α
field␈α
is␈α
 non-zero,␈α
  then␈α
 that␈α
value␈α
 will␈α
be␈α
 used;␈α
otherwise␈α
 the␈α
current␈α
"system"␈αdefault
␈↓will␈αbe␈αused.

␈↓NOTE:␈α SPROUT_DEFAULTS␈α only␈αapplies␈α to␈α "allocations",␈αi.e.␈α  the␈αprocess␈αstatus␈αcontrol␈αbits
␈↓(e.g.␈αSUSPME)␈αare␈αnot␈αaffected.
␈↓αExample:

␈↓α        RECURSIVE PROCEDURE FOO;
␈↓α         BEGIN
␈↓α         SPROUT_DEFAULTS STRINGSTACK(10);
␈↓α         INTEGER XXX;
␈↓α         :
␈↓α         :
␈↓α         END;
␈↓α        :
␈↓α        SPROUT(P1,FOO,STRINGSTACK(3));
␈↓α        SPROUT(P2,FOO);
␈↓α        COMMENT P1 will have a string stack of 3*32 words.
␈↓α         P2 will have a string stack of 10*32 words;





␈↓␈↓ εI5␈↓ X
␈↓SAIL Addendum  1␈↓ λnNEW PROCESS FEATURES


␈↓3.3␈α-␈α␈↓↓SUSPEND␈↓


␈↓SUSPEND␈αnow␈αbehaves␈αlike␈αRESUME␈αin␈αthat␈αit␈αreturns␈αan␈αitem.

␈↓        itm ← SUSPEND(<process item>)

␈↓Frequently,␈α∂one␈α∞is␈α∂suspending␈α∞some␈α∂other␈α∞process␈α∂than␈α∞the␈α∂one␈α∞that␈α∂is␈α∞executing␈α∂the␈α∞SUSPEND
␈↓statement.␈αIn␈αthis␈αcase,␈αthe␈αitem␈αreturned␈αis␈αANY.␈α  However,␈αin␈αcases␈αlike:

␈↓        X ← SUSPEND(MYPROC);

␈↓where␈α∪the␈α∀process␈α∪suspends␈α∪itself,␈α∀it␈α∪might␈α∪happen␈α∀that␈α∪this␈α∪process␈α∀is␈α∪made␈α∪running␈α∀by␈α∪a
␈↓RESUME␈α
from␈α
another␈α
process.␈α
If␈α
so,␈α
then␈α
X␈α
receives␈α
the␈α
<return_item>␈α
 that␈α
was␈α∞an␈α
argument
␈↓to␈αthe␈αRESUME.



␈↓3.4␈α∞-␈α
␈↓↓FAIL␈α∞AND␈α
SUCCEED␈↓


␈↓FAIL␈α∂and␈α∂SUCCEED␈α∂now␈α∂behave␈α∂like␈α∂RESUME␈α∞and␈α∂SUSPEND␈α∂in␈α∂that␈α∂they␈α∂also␈α∂return␈α∂an␈α∞item.
␈↓The␈α
item␈αreturned␈α
is␈α
ANY␈αunless␈α
the␈α
Matching␈αProcedure␈α
containing␈α
the␈αFAIL␈α
or␈α
SUCCEED␈αwas
␈↓(1)␈α
sprouted␈α
as␈α∞a␈α
process,␈α
and␈α∞(2)␈α
made␈α
running␈α
by␈α∞a␈α
RESUME␈α
construct.␈α∞ In␈α
the␈α
latter␈α∞case,␈α
the
␈↓item␈α
returned␈α∞is␈α
the␈α∞<return_item>␈α
that␈α∞was␈α
an␈α∞argument␈α
to␈α∞the␈α
RESUME.␈α∞ [Note␈α
that␈α∞the␈α
only
␈↓case␈αin␈αwhich␈αa␈αMatching␈αProcedure␈αcan␈αbe␈αreactivated␈αat␈αa␈αFAIL␈αis␈αby␈αbeing␈αRESUMEd.]



















␈↓␈↓ εI6␈↓ X
␈↓SAIL Addendum  1␈↓ 	XERROR HANDLING


␈↓␈↓ ¬↑␈↓↓SECTION  4␈↓

␈↓␈↓ ¬_␈↓↓ERROR HANDLING␈↓







␈↓4.1␈α
-␈α
␈↓↓ERROR␈αMODES␈↓


␈↓SAIL's␈αerror␈α handler␈αhas␈αat␈α long␈αlast␈αbeen␈α modified␈αto␈αdo␈α what␈αis␈αclaimed␈αit␈αwill␈αdo␈α in␈αSection
␈↓20␈αof␈αthe␈αmanual␈α(pgs␈α95␈α-␈α97),␈αand␈αin␈αthe␈αdescription␈αof␈αUSERERR␈α(pg␈α42).␈α In␈αbrief,␈αit␈αallows␈αone
␈↓to␈α have␈αerror␈α messages␈αautomatically␈α sent␈α to␈α a␈α"log"␈α file␈α while␈αone␈α is␈αcompiling,␈αand␈αto␈αuse
␈↓USERERR␈αas␈αa␈αtrace␈αstatement.

␈↓The␈αdescription␈αgiven␈αin␈αthe␈α
manual␈αdiffers␈αfrom␈αreality␈αin␈α
two␈αways:␈α"Keep"␈αmode␈αhas␈α
not␈α been
␈↓implemented␈α(the␈αerror␈αhandler␈α will␈αflush␈αall␈αtype-ahead␈αexcept␈αa␈α<lf>);␈α  all␈αof␈αthe␈α other␈αmodes
␈↓("Quiet",␈α "Logging",␈αand␈α"Numbers")␈αare␈αimplemented␈αONLY␈α IN␈αTHE␈αCOMPILER.␈α  However,␈αone
␈↓can␈α⊂get␈α∂the␈α⊂effect␈α⊂of␈α∂error␈α⊂modes␈α⊂at␈α∂runtime␈α⊂by␈α⊂using␈α∂a␈α⊂brand␈α⊂new␈α∂feature␈α⊂called␈α⊂user␈α∂error
␈↓procedures.



␈↓4.2␈α∞-␈α
␈↓↓USER␈α∞ERROR␈α
PROCEDURES␈↓


␈↓A␈α user␈αerror␈α procedure␈αis␈αa␈α user␈αprocedure␈α that␈αis␈αrun␈α before␈αor␈αinstead␈αof␈α the␈α SAIL␈αerror
␈↓handler␈α⊂ everytime␈α⊂ an␈α⊃error␈α⊂ occurs␈α⊂ at␈α⊃runtime.␈α⊂ This␈α⊂ includes␈α⊃all␈α⊂array␈α⊂errors,␈α⊃IO␈α⊂ errors,
␈↓Leapish␈α∞errors␈α
and␈α∞all␈α
USERERRs.␈α∞ It␈α
does␈α∞not␈α
include␈α∞system␈α
errors,␈α∞such␈α
as␈α∞Ill␈α
Mem␈α∞Ref␈α∞or␈α
Ill
␈↓UUO.

␈↓The␈α procedure␈αone␈αuses␈α for␈αa␈α user␈αerror␈αprocedure␈α must␈αbe␈α of␈αthe␈αfollowing␈αtype:

␈↓␈↓ α{SIMPLE INTEGER PROCEDURE proc (INTEGER loc; STRING msg, rsp);


␈↓Only␈α∞the␈α∞names␈α∞ proc,␈α∞loc,␈α∞ msg,␈α∞and␈α∞rsp␈α∞ may␈α∞vary␈α∞ from␈α∞the␈α∞ example␈α∞above,␈α∞except␈α∞ that␈α∞one
␈↓may␈αdeclare␈α the␈αprocedure␈α INTERNAL␈αif␈α one␈αwishes␈αto␈αuse␈αit␈αacross␈αfiles.

␈↓Whenever␈α the␈α
external␈αinteger␈α
_ERRP_␈α is␈αloaded␈α
with␈αLOCATION(proc),␈α
the␈αerror␈α
handler␈αwill


␈↓␈↓ εI7␈↓ X
␈↓SAIL Addendum  1␈↓ 	XERROR HANDLING


␈↓call␈α
proc␈α∞before␈α
it␈α
 does␈α∞anything␈α
else.␈α
  It␈α∞will␈α
set␈α∞loc␈α
to␈α
 the␈α∞core␈α
location␈α
of␈α∞the␈α
call␈α∞ to␈α
the
␈↓error␈α∞handler.␈α∞ Msg␈α∞ will␈α∞be␈α∞ the␈α∞message␈α∞ that␈α∞it␈α∞ would␈α∞have␈α∞ printed.␈α∞ Rsp␈α∞will␈α∂be␈α∞non-NULL
␈↓only␈αif␈αthe␈αerror␈αwas␈αfrom␈αa␈αUSERERR␈αwhich␈αhad␈αresponse␈αstring␈αargument.␈α Proc␈αcan␈αdo␈αanything
␈↓that␈α⊂ a␈α∂simple␈α⊂procedure␈α∂can␈α⊂do.␈α∂ When␈α⊂it␈α∂exits,␈α⊂it␈α∂should␈α⊂ return␈α∂an␈α⊂ integer␈α∂which␈α⊂ tells␈α∂the
␈↓error␈αhandler␈α if␈α it␈αshould␈αdo␈αanything␈αmore.␈α If␈αthe␈αinteger␈αis␈α0,␈αthe␈αerror␈αhandler␈αwill␈α(1)␈α print
␈↓the␈α message,␈α(2)␈α print␈αthe␈αlocation,␈αand␈α(3)␈αquery␈αthe␈αtty␈αand␈αdispatch␈αon␈αthe␈αresponse␈αcharacter
␈↓(i.e␈αask␈αfor␈αa␈α<cr>,␈α<lf>,␈αetc.).␈α If␈αthe␈αright␈αhalf␈αof␈αthe␈αinteger␈αis␈αnon-zero,␈αit␈αis␈αtaken␈αas␈αthe␈αascii
␈↓for␈α
a␈α
character␈αto␈α
dispatch␈α
upon.␈α
 The␈αleft␈α
half␈α
may␈αhave␈α
two␈α
bits␈α
to␈αcontrol␈α
printing.␈α
  If␈α
bit␈α17
␈↓in␈α∂the␈α∂integer␈α∞is␈α∂on,␈α∂message␈α∂printing␈α∞is␈α∂inhibited.␈α∂ If␈α∞bit␈α∂16␈α∂is␈α∂on,␈α∞then␈α∂the␈α∂location␈α∂printing␈α∞is
␈↓inhibited.␈α⊃For␈α⊃example,␈α⊃"X"+(1␈α⊃LSH␈α⊂18)␈α⊃will␈α⊃cause␈α⊃the␈α⊃location␈α⊂to␈α⊃be␈α⊃printed␈α⊃and␈α⊃the␈α⊂program
␈↓exited.␈α"C"+(3␈αLSH␈α18)␈αwill␈αcause␈αthe␈αerror␈αhandler␈αto␈αcontinue␈αwithout␈αprinting␈αanything.

␈↓Note␈α∞that␈α∞simple␈α∞ procedures␈α∞can␈α
not␈α∞do␈α∞ a␈α∞non-local␈α∞GOTO.␈α
  However,␈α∞the␈α∞ effect␈α∞of␈α∞ a␈α
non-
␈↓local␈α∪ GOTO␈α∩ can␈α∪be␈α∩ achieved␈α∪in␈α∩ a␈α∪ user␈α∩error␈α∪procedure␈α∩by␈α∪loading␈α∩the␈α∪external␈α∩integer
␈↓_ERRJ_␈αwith␈αthe␈αLOCATION␈αof␈αa␈αlabel.␈αThe␈αlabel␈αshould␈αbe␈αa␈αon␈αa␈αcall␈αto␈αa␈αnon-simple␈αprocedure
␈↓which␈αdoes␈α
the␈αdesired␈α
GOTO.␈α The␈α
error␈αhandler␈αclears␈α
_ERRJ_␈αbefore␈α
calling␈αthe␈α
procedure␈αin
␈↓_ERRP_.␈α If␈α_ERRJ_␈α is␈αnon-zero␈αwhen␈α
the␈α user␈αprocedure␈αreturns,␈αand␈αcontinuing␈α
was␈αspecified,
␈↓then␈αthe␈αerror␈αhandler's␈αexit␈α consists␈αof␈αa␈αsimple␈αtransfer␈αto␈α that␈αlocation.

␈↓WARNING!␈α⊂Handling␈α⊂errors␈α⊂from␈α⊂strange␈α⊂places␈α⊂like␈α⊂the␈α⊂string␈α⊂garbage␈α⊂collector␈α⊂and␈α⊃the␈α⊂core
␈↓management␈αroutines␈αwill␈αget␈αyou␈αinto␈αdeep␈αtrouble.
























␈↓␈↓ εI8␈↓ X
␈↓SAIL Addendum  1␈↓ λ INEXHAUSTIBLE STRING SPACE


␈↓␈↓ ¬↑␈↓↓SECTION  5␈↓

␈↓␈↓ ∧⊂␈↓↓INEXHAUSTIBLE STRING SPACE␈↓





␈↓The␈αstring␈αgarbage␈αcollector␈αhas␈αbeen␈αmodified␈αto␈αexpand␈αstring␈αspace␈α(using␈αdiscontiguous␈αblocks)
␈↓whenever␈α
necessary␈α
to␈α
satisfy␈α
the␈α
demand␈α
for␈α∞places␈α
to␈α
put␈α
strings.␈α
To␈α
take␈α
advantage␈α∞ of␈α
 this
␈↓feature,␈α one␈αneed␈αnot␈αchange␈αhis␈αprograms.

␈↓Here␈αare␈αsome␈αpoints␈αwhich␈αmight␈αbe␈αof␈αinterest,␈αhowever:

␈↓1)␈↓ αλAlthough␈α⊃ we␈α⊃ are␈α∩ going␈α⊃ to␈α⊃ provide␈α⊃ user␈α∩control␈α⊃over␈α⊃all␈α⊃size␈α∩parameters␈α⊃eventually,
␈↓␈↓ αλcurrently␈α∃only␈α∃ the␈α∃ initial␈α∃ string␈α∃ space␈α∃size␈α∃ is␈α∃ settable␈α∃ by␈α∃ the␈α∃ user,␈α⊗either␈α∃via
␈↓␈↓ αλREQUIRE␈α
or␈α
the␈α
ALLOC␈α
sequence,␈α
as␈α
before.␈α
 The␈α
size␈α
of␈α
each␈α
string␈α
space␈α
increment␈αwill
␈↓␈↓ αλbe␈α
 the␈α
same␈α
as␈α
the␈α
original␈α
size,␈α
which␈α
need␈α
not␈α
be␈α
monstrous␈α
any␈α
more␈α
unless␈α∞you␈α
 know
␈↓␈↓ αλthat␈α∃all␈α∃runs␈α∃of␈α∃your␈α∃program␈α⊗will␈α∃ need␈α∃ a␈α∃monstrous␈α∃ string␈α∃ space␈α⊗ anyhow.␈α∃  The
␈↓␈↓ αλthreshold␈α
(see␈α∞below)␈α
for␈α
expanding␈α∞will␈α
be␈α
set␈α∞at␈α
1/8␈α
 the␈α∞ string␈α
 space␈α∞ size␈α
 (increment
␈↓␈↓ αλsize).

␈↓2)␈↓ αλOne␈α∩can,␈α∩in␈α∩his␈α∩program,␈α∩modify␈α∩these␈α∩values␈α∩independently,␈α∩if␈α∩he␈α∩is␈α∩willing␈α∩to␈α∩use␈α∩the
␈↓␈↓ αλUSERCON␈αfunction,␈αand␈αto␈αfollow␈αthis␈αformat:

␈↓β     USER TABLE ENTRY NAME              VALUE
␈↓β        STINCR          lh: number of chars. in increment
␈↓β                        rh: number of words in increment + 4

␈↓β        STREQD          lh: number of chars. in threshold
␈↓β                        rh: number of words in threshold.


␈↓3)␈↓ αλThe␈αthreshold.␈α After␈αgarbage␈αcollection,␈αlet␈αus␈αsay␈αthat␈αM-1␈αdiscontiguous␈αstring␈αspaces␈α are
␈↓␈↓ αλfull,␈α
 and␈α the␈α
 M'th␈α
 has␈α n␈α
 free␈α characters␈α
in␈α
it␈α(available␈α
for␈αnew␈α
strings).␈α
 The␈α garbage
␈↓␈↓ αλcollector␈α was␈α called␈αbecause␈α some␈αroutine␈αwanted␈αto␈αcreate␈αa␈αstring␈αR␈αcharacters␈αlong,␈αand
␈↓␈↓ αλthere␈α
were␈α
not␈αthat␈α
many␈α
 available␈α(free).␈α
    After␈α
 garbage␈αcollection,␈α
 the␈α
new␈αalgorithm
␈↓␈↓ αλrequires␈α
that␈α
N␈α
be␈α
greater␈α
than␈α
R+LH(STREQD).␈α If␈α
it␈α
is␈α
not,␈α
expansion␈α
takes␈α
place␈α
(to␈αM+1
␈↓␈↓ αλspaces),␈α∞to␈α∞ satisfy␈α
 this␈α∞requirement.␈α∞   In␈α∞other␈α
words,␈α∞if␈α∞STREQD␈α∞is␈α
1/8␈α∞the␈α∞size␈α∞of␈α
the
␈↓␈↓ αλcurrent␈α⊃space,␈α⊂that␈α⊃space␈α⊂will␈α⊃not␈α⊃be␈α⊂ allowed␈α⊃ to␈α⊂become␈α⊃ more␈α⊂ than␈α⊃ about␈α⊃ 7/8␈α⊂ full.
␈↓␈↓ αλThis␈αhelps␈αavoid␈α
frequent,␈αnearly␈αuseless␈α
calls␈αon␈αthe␈αgarbage␈α
collector␈αwhen␈α space␈α
is␈αabout
␈↓␈↓ αλgone.␈α  All␈αbut␈αthe␈αcurrent␈αspace␈αare␈αallowed␈αto␈αbecome␈αas␈αfull␈αas␈αpossible,␈αhowever.



␈↓␈↓ εI9␈↓ X
␈↓SAIL Addendum  1␈↓ λ INEXHAUSTIBLE STRING SPACE


␈↓4)␈↓ αλNew␈α∞statistics␈α∞are␈α∞maintained␈α∞by␈α∞the␈α∞ garbage␈α∞ collector.␈α∞    Soon␈α∞there␈α∞ will␈α∞ be␈α∂a␈α∞built-in
␈↓␈↓ αλroutine␈α∪you␈α∪can␈α∩use␈α∪to␈α∪print␈α∩them.␈α∪ For␈α∪now,␈α∩you␈α∪may␈α∪look␈α∩at␈α∪them␈α∪using␈α∩USERCON,
␈↓␈↓ αλalthough␈α
this␈α∞ document␈α
 does␈α∞not␈α
 say␈α∞ what␈α
 they␈α
 are.␈α∞    In␈α
 order␈α∞to␈α
activate␈α∞timing␈α
of
␈↓␈↓ αλthe␈αgarbage␈αcollector␈α(slows␈αit␈αdown),␈αset␈αSGCTIME␈αin␈αthe␈α user␈α table␈αto␈α-1.

␈↓5)␈↓ αλFuture␈α∂plans.␈α∂ The␈α∂ new␈α∂ structure␈α∂ not␈α∂only␈α∂allows␈α∂expansion␈α∂of␈α∂string␈α∂space,␈α∂it␈α∂also␈α∞will
␈↓␈↓ αλallow␈α
 for␈α
 partial␈α
 garbage␈α
 collections␈α (no␈α
 visible␈α
benefits␈α
 except␈α
 increased␈α
speed,␈αsince
␈↓␈↓ αλa␈αpartial␈αcollection␈αwill␈αbe␈αalmost␈αas␈αeffective␈αas␈αa␈αcomplete␈αone,␈αand␈α much␈α faster),␈α and␈αthe
␈↓␈↓ αλability␈α∂ to␈α∂ move␈α∂ string␈α⊂ space␈α∂ blocks,␈α∂in␈α∂order␈α∂to␈α⊂compact␈α∂memory.␈α∂ Push␈α∂on␈α⊂your␈α∂local
␈↓␈↓ αλrepresentative␈α to␈α get␈α these␈α things␈αdone.



































␈↓␈↓ εB10␈↓ X
␈↓SAIL Addendum  1␈↓ π{MISCELLANEOUS NEW FEATURES


␈↓␈↓ ¬↑␈↓↓SECTION  6␈↓

␈↓␈↓ ∧␈↓↓MISCELLANEOUS NEW FEATURES␈↓







␈↓6.1␈α∞-␈α
␈↓↓NEW␈α∞MTAPE␈α
OPTIONS␈↓


␈↓        MTAPE(chan,NULL)


␈↓will␈αcause␈αan␈αMTAPE␈α0␈αto␈αbe␈αissued␈αfor␈αchannel␈αchan.␈α For␈αmag.␈αtapes,␈αthis␈αwill␈αcause␈αyou␈αto␈αwait
␈↓until␈α∞all␈α∞activity␈α
ceases.␈α∞ For␈α∞other␈α∞devices,␈α
various␈α∞random␈α∞things␈α
can␈α∞happen,␈α∞depending␈α∞on␈α
the
␈↓device␈αand␈αsystem.

␈↓In␈α∂export␈α⊂SAIL,␈α∂MTAPE(chnl,"I")␈α∂sets␈α⊂the␈α∂'IBM␈α∂compatible'␈α⊂mode␈α∂for␈α∂a␈α⊂tape␈α∂drive.␈α∂ (It␈α⊂does␈α∂an
␈↓MTAPE␈αchnl,101.)



␈↓6.2␈α
-␈α
␈↓↓INITIALIZATION␈αPHASES␈↓


␈↓User␈α
initializations␈α
 are␈α
 now␈αdone␈α
 in␈α
successive␈α
 phases,␈αwith␈α
 all␈α
initializations␈α
  required␈α  for
␈↓one␈α  phase␈α  being␈α done␈α  before␈αinitializations␈αrequired␈αfor␈αthe␈αnext␈αphase.

␈↓Syntax:

␈↓        REQUIRE <procid> INITIALIZATION;
␈↓        REQUIRE <procid> INITIALIZATION [<phase no>];

␈↓where <phase no> is an integer constant.

␈↓Semantics:

␈↓<phase␈αno>␈αspecifies␈α the␈αnumber␈α of␈αthe␈αuser␈α initialization␈αphase.␈α If␈α it␈αis␈αleft␈αout,␈α then␈αone␈αis
␈↓used.␈α  Currently,␈αthere␈αare␈αthree␈α phases,␈αnumbered␈α0,␈α1,␈αand␈α 2.␈α If␈αthe␈α demand␈αis␈αgreat␈αenough,
␈↓additional␈α⊃phases␈α⊂may␈α⊃ be␈α⊂added␈α⊃later.␈α⊃  (Note␈α⊂for␈α⊃assembly␈α⊂ language␈α⊃hackers:␈α⊃internally,␈α⊂user
␈↓phases␈αare␈αnumbered␈α'400000,␈α'400001,␈αetc.)

␈↓␈↓ εB11␈↓ X
␈↓SAIL Addendum  1␈↓ π{MISCELLANEOUS NEW FEATURES


␈↓6.3␈α-␈α␈↓↓CHNCDB␈↓


␈↓        val←CHNCDB(channel)

␈↓This␈α∂integer␈α∂procedure␈α∂returns␈α⊂a␈α∂pointer␈α∂to␈α∂the␈α∂three␈α⊂word␈α∂block␈α∂used␈α∂to␈α∂open␈α⊂the␈α∂ specified
␈↓channel.␈α∞  It␈α∞is␈α∞provided␈α∞ for␈α∞the␈α∞benefit␈α∞ of␈α∞assembly␈α∞language␈α∞procedures␈α∞that␈α∞may␈α∞want␈α∞to␈α
do
␈↓I/O␈αinside␈αsome␈αfast␈αinner␈αloop,␈αbut␈αwhich␈αmay␈αwant␈αto␈αlive␈αin␈αa␈αSAIL␈αcore␈αimage␈α&␈αuse␈αthe␈αSAIL
␈↓OPEN,␈αetc.



␈↓6.4␈α-␈α␈↓↓ARRCLR␈↓


␈↓        ARRCLR(arry)

␈↓This␈αnew␈αruntime␈αroutine␈αclears␈αany␈αkind␈αof␈αarray.␈αThat␈αis,␈αarthmetic␈αarrays␈αget␈αfilled␈αwith␈αzeros,
␈↓string␈α∞arrays␈α∂with␈α∞NULLs,␈α∞and␈α∂itemvar␈α∞arrays␈α∞with␈α∂ANYs.␈α∞ One␈α∞may␈α∂use␈α∞ARRCLR␈α∞with␈α∂set␈α∞and
␈↓list␈α⊂arrays,␈α⊂but␈α∂the␈α⊂set␈α⊂and␈α⊂list␈α∂space␈α⊂will␈α⊂be␈α∂lost␈α⊂(i.e.␈α⊂un-garbage-collectable).␈α⊂The␈α∂alternative
␈↓form:

␈↓        ARRCLR(arry,val)


␈↓where␈αval␈α
is␈αeither␈α
an␈αinteger␈αor␈α
a␈αreal␈α
number,␈αwill␈αfill␈α
arry␈αwith␈α
that␈αvalue.␈α Do␈α
not␈αdo␈α
this␈αto
␈↓string␈α∞or␈α∞list␈α∞arrays␈α∞unless␈α∞you␈α∞do␈α∞not␈α
care␈α∞whether␈α∞or␈α∞not␈α∞your␈α∞program␈α∞works.␈α∞ Also␈α∞using␈α
a
␈↓real␈α
val␈α
for␈α
an␈α
itemvar␈α
array␈α
is␈α
apt␈α
to␈α∞cause␈α
strange␈α
results.␈α
(If␈α
you␈α
use␈α
an␈α
integer,␈α
arry␈α∞will␈α
be
␈↓filled␈αwith␈αCVI(val).)



␈↓6.5␈α-␈α␈↓↓SETPL␈↓


␈↓        SETPL(channel, @linnum, @pagnum, @sosnum)

␈↓This␈α∃new␈α⊗runtime␈α∃routine␈α⊗allows␈α∃one␈α⊗to␈α∃keep␈α∃track␈α⊗of␈α∃the␈α⊗string␈α∃input␈α⊗from␈α∃CHANNEL.
␈↓Whenever␈α∃a␈α∃'12␈α∃is␈α∃encountered,␈α⊗LINNUM␈α∃is␈α∃incremented.␈α∃ Whenever␈α∃a␈α∃'14␈α⊗is␈α∃encountered,
␈↓PAGNUM␈α
is␈αincremented,␈α
and␈α
LINNUM␈αis␈α
zeroed.␈α Whenever␈α
an␈α
SOS␈αline␈α
number␈α
is␈αencountered,
␈↓it␈α
is␈α
placed␈α
into␈α∞SOSNUM.␈α
 When␈α
fully␈α
implemented␈α
(soon),␈α∞this␈α
will␈α
work␈α
on␈α
the␈α∞INPUT,␈α
INTIN,
␈↓and␈αREALIN␈αfunctions␈αas␈αwell.



␈↓␈↓ εB12␈↓ X
␈↓SAIL Addendum  1␈↓ π{MISCELLANEOUS NEW FEATURES


␈↓6.6␈α-␈α␈↓↓EVALREDEFINE␈↓


␈↓EVALREDEFINE␈α⊃bears␈α⊂the␈α⊃same␈α⊂relationship␈α⊃to␈α⊂REDEFINE␈α⊃as␈α⊂EVALDEFINE␈α⊃does␈α⊃to␈α⊂DEFINE.
␈↓See␈αpages␈α47␈αand␈α50␈αof␈αthe␈αManual.



␈↓6.7␈α-␈α␈↓↓CVPS␈↓


␈↓CVPS(<macro_parameter>)␈α∂converts␈α∂<macro_parameter>␈α∂to␈α∂a␈α∂string␈α∂and␈α∂returns␈α∂the␈α∂string.␈α∞See
␈↓about␈αmacro␈αparameters␈αon␈αpage␈α48␈αof␈αthe␈αmanual.



␈↓6.8␈α∞-␈α
␈↓↓EXPRESSIONS␈α∞IN␈α
REQUIRES␈↓


␈↓Previously,␈αall␈αREQUIRE␈αconstructs␈αhad␈αto␈αhave␈αonly␈αconstants␈αin␈αthem.␈αNow␈αSAIL␈αallows␈αcompile
␈↓time␈αexpressions␈αas␈αwell.␈αSee␈αabout␈αcompile␈αtime␈αexpressions␈αon␈αpage␈α47␈αof␈αthe␈αManual.



␈↓6.9␈α-␈α␈↓↓RELEASE␈↓


␈↓RELEASE␈αnow␈αtakes␈αan␈αoptional␈αsecond␈αargument,␈αthe␈αCLOSE␈αinhibit␈αbits.␈α These␈αare␈αdescribed␈αin
␈↓the␈α∞UUO␈α∞manual␈α∞(Stanford␈α∞System).␈α
These␈α∞are␈α∞defaulted␈α∞to␈α∞zero␈α
when␈α∞not␈α∞specified␈α∞so␈α∞that␈α
old
␈↓programs␈αwhich␈αdid␈αnot␈αspecify␈αthem␈αwill␈αwork␈αas␈αbefore.



␈↓6.10␈α-␈α␈↓↓TTYUP␈↓


␈↓        oldval←TTYUP(newval)


␈↓This␈αroutine␈αcasuse␈αconversion␈αof␈αlower␈αcase␈αcharacters␈α(a-z)␈αto␈αtheir␈αupper␈αcase␈αequivalents␈αfor
␈↓strings␈α⊂read␈α∂by␈α⊂any␈α⊂of␈α∂the␈α⊂SAIL␈α⊂teletype␈α∂routines␈α⊂that␈α⊂do␈α∂not␈α⊂use␈α⊂break␈α∂tables.␈α⊂ If␈α⊂newval␈α∂is
␈↓TRUE,␈αthen␈αconversion␈αwill␈αtake␈αplace␈αon␈αall␈αsubsequent␈αinputs␈αuntil␈αTTYUP␈αis␈αcalled␈αwith␈αnewval
␈↓FALSE.␈α∞ Oldval␈α
will␈α∞always␈α
get␈α∞set␈α
to␈α∞the␈α
value␈α∞of␈α
newval␈α∞used␈α
in␈α∞the␈α
previous␈α∞call.␈α∞(If␈α
TTYUP


␈↓␈↓ εB13␈↓ X
␈↓SAIL Addendum  1␈↓ π{MISCELLANEOUS NEW FEATURES


␈↓has␈α⊃never␈α⊃been␈α⊃called,␈α⊃then␈α⊂no␈α⊃conversions␈α⊃will␈α⊃take␈α⊃place,␈α⊂and␈α⊃the␈α⊃first␈α⊃call␈α⊃to␈α⊃TTYUP␈α⊂will
␈↓return␈αFALSE).



␈↓6.11␈α∞-␈α∂␈↓↓BREAKSET␈α∞MODES␈α∞"K"␈α∂AND␈α∞"F"␈↓


␈↓A␈α∞"K"␈α∞specification␈α∞as␈α∞a␈α∞BREAKSET␈α∞mode␈α
will␈α∞cause␈α∞lower␈α∞to␈α∞upper␈α∞case␈α∞conversion␈α∞when␈α
that
␈↓break␈α⊂table␈α∂is␈α⊂used.␈α∂ Conversion␈α⊂takes␈α⊂place␈α∂before␈α⊂each␈α∂character␈α⊂is␈α∂checked␈α⊂for␈α⊂breaking␈α∂or
␈↓omission.␈α An␈α"F"␈αspecification␈αturns␈αoff␈αthe␈αconversion␈α--␈αi.e.␈αit␈αundoes␈αthe␈αeffects␈αof␈α"K".



␈↓6.12␈α-␈α␈↓↓INOUT␈↓


␈↓        INOUT(inchan,outchan,howmany)


␈↓INOUT␈αreads␈αhowmany␈αwords␈αfrom␈αchannel␈αinchan␈αand␈αwrites␈αthem␈αout␈αon␈αchannel␈αoutchan.␈α Each
␈↓channel␈α∂must␈α∂be␈α∂open␈α∞in␈α∂a␈α∂mode␈α∂between␈α∂8␈α∞and␈α∂12.␈α∂ on␈α∂return,␈α∞the␈α∂EOF␈α∂variables␈α∂for␈α∂the␈α∞two
␈↓channels␈α∂will␈α∂be␈α∞the␈α∂same␈α∂as␈α∞if␈α∂ARRYIN␈α∂&␈α∂ARRYOUT␈α∞had␈α∂been␈α∂used.␈α∞ If␈α∂howmany␈α∂is␈α∂less␈α∞than
␈↓zero,␈αthen␈αtransfer␈αof␈αdata␈αwill␈αcease␈αonly␈αupon␈αend␈αof␈αfile␈αor␈αa␈αdevice␈αerror.

␈↓(note:␈αINOUT␈αuses␈αBLTs␈αto␈αtransfer␈αdata␈αdirectly␈αfrom␈αone␈αset␈αof␈αbuffers␈αto␈αthe␈αother)



␈↓6.13␈α∞-␈α
␈↓↓GETSTS␈α∞&␈α
SETSTS␈↓


␈↓        SETSTS(chan,new_status)

␈↓issues a SETSTS uuo on channel chan with the status value new_status.

␈↓        status←GETSTS(chan)


␈↓returns␈αthe␈αresults␈αof␈αa␈αGETSTS␈αuuo␈αon␈αchannel␈αchan.





␈↓␈↓ εB14␈↓ X
␈↓SAIL Addendum  1␈↓ π{MISCELLANEOUS NEW FEATURES


␈↓6.14␈α∞-␈α∂␈↓↓CHANGES␈α∞TO␈α∞"OPEN"␈α∂ERROR␈α∞HANDLING␈↓


␈↓If␈αthe␈αEOF␈αvariable␈αsupplied␈αto␈αOPEN␈αis␈αnon-zero␈αand␈αthe␈αdevice␈αname␈αis␈αinvalid,␈αthen␈αOPEN␈αwill
␈↓fail␈αwithout␈αgiving␈αthe␈αerror␈αmessage␈α
"INVALID␈αDEVICE␈αNAME␈αFOR␈αOPEN",␈αand␈αthe␈α
EOF␈αvalue
␈↓will␈α
be␈α
unchanged.␈α
 If␈αa␈α
device␈α
is␈α
unavailable,␈αand␈α
EOF=0,␈α
then␈α
the␈αuser␈α
is␈α
now␈α
given␈α
the␈αoptions
␈↓of␈α∞trying␈α∞again␈α∞or␈α∞going␈α∞on␈α∞without␈α∞opening␈α∂the␈α∞device,␈α∞in␈α∞which␈α∞case␈α∞EOF␈α∞will␈α∞be␈α∞set␈α∂to␈α∞non-
␈↓zero␈αas␈αusual.



␈↓6.15␈α-␈α␈↓↓ASH␈↓


␈↓ASH␈α∪has␈α∩been␈α∪added␈α∩as␈α∪an␈α∪arithmetic␈α∩operator.␈α∪ Its␈α∩syntax␈α∪is␈α∪just␈α∩like␈α∪that␈α∩of␈α∪LSH,␈α∪and␈α∩it
␈↓generates␈αsimilar␈αcode␈α(except␈αfor␈αputting␈αout␈αa␈αPDP-10␈αASH␈αinstruction␈αinstead␈αof␈αa␈αLSH).



␈↓6.16␈α-␈α␈↓↓ARG_LIST␈↓


␈↓        ARG_LIST(<arg1>,...,<argn>)


␈↓where␈α∂each␈α⊂<arg>␈α∂may␈α∂be␈α⊂any␈α∂valid␈α∂argument␈α⊂to␈α∂the␈α∂REF_ITEM␈α⊂construct,␈α∂assembles␈α∂a␈α⊂list␈α∂of
␈↓"temporary"␈α
reference␈α
items␈α
that␈α∞will␈α
be␈α
deleted␈α
by␈α∞APPLY␈α
after␈α
the␈α
applied␈α∞procedure␈α
returns.
␈↓Thus

␈↓        APPLY(proc,ARG_LIST(foo,bar,VALUE baz))

␈↓is roughly equivalent to

␈↓        tmplst←{{REF_ITEM(foo),REF_ITEM(bar),REF_ITEM(VALUE baz)}};
␈↓        APPLY(proc,tmplst);
␈↓        WHILE LENGTH(tmplst) DO DELETE(LOP(tmplst));


␈↓but␈α∂is␈α∞somewhat␈α∂easier␈α∂to␈α∞type.␈α∂ Note␈α∞that␈α∂the␈α∂reference␈α∞items␈α∂created␈α∞by␈α∂ARG_LIST␈α∂are␈α∞just
␈↓like␈α∞those␈α
created␈α∞by␈α∞REF_ITEM,␈α
except␈α∞that␈α∞they␈α
are␈α∞marked␈α
so␈α∞that␈α∞APPLY␈α
will␈α∞know␈α∞to␈α
kill
␈↓them.




␈↓␈↓ εB15␈↓ X
␈↓SAIL Addendum  1␈↓ πmMINOR CORRECTIONS TO AIM-204


␈↓␈↓ ¬↑␈↓↓SECTION  7␈↓

␈↓␈↓ β}␈↓↓MINOR CORRECTIONS TO AIM-204␈↓




␈↓βThis is a file of known SAIL manual defects (mainly typos) that
␈↓βare not already noted in the preface or covered by the "incremental"
␈↓βSAIL manual.  It is primarily an internal document for the SAIL
␈↓βhackers, put is being provided here as a stopgap measure pending
␈↓βa full new edition for the manual.  This list is, however, not
␈↓βcomplete in that it does not include a number of typos that do
␈↓βnot change the meaning.  If, however, you discover any defects
␈↓βin the manual or in the update, please notify your friendly local
␈↓βSAIL representative.

␈↓β99R     KVL     The synonym for "SUCH THAT" is "|" and not "↓"

␈↓β32R     KVL     APPENDIX 5 has nothing to do with the 
␈↓β                bits for IO errors or mode enablings

␈↓β43L     RHT     FILEINFO documentation is a lie.  You usually get:

␈↓β                FILENAME
␈↓β                EXT,,DATE
␈↓β                prot(9)Mode(4)time(11)date(12)
␈↓β                negative swapped word count (if did a lookup).
␈↓β                0  (unless you opened device in magic mode)
␈↓β                0

␈↓β                The whole point is that what you get is the six words
␈↓β                from the last lookup or enter.  For details see the 
␈↓β                monitor manual.

␈↓β58R     JRL     if a designated bracketed triple is not found
␈↓β                then bindit is returned and no error message is given

␈↓β33L     JRL     release now takes a second defaultable value integer
␈↓β                argument, the close inhibit bits (see RELEAS in UUO 
␈↓β                manual).  These are defaulted to zero when unspecified.

␈↓β72R     KVL     TELLALL does not do an implicit RESCHEDULE as the 
␈↓β                description implies -- it just sets the status of
␈↓β                the concerned processes to "ready".

␈↓β102R    RFS     "33 through 36" S/B "33 through 35"

␈↓β105R    RFS     ". her are several"    s/b " . There are several"

␈↓β79R,L   KVL     JOBTPC should be loaded with the location of a CALL to
␈↓β                a non-simple procedure. 

␈↓␈↓ εB16␈↓ X
␈↓SAIL Addendum  1␈↓ πmMINOR CORRECTIONS TO AIM-204



␈↓β92R     JRL     20F will in future surround macro expansions with
␈↓β                "<>" not "⊂⊃".

␈↓β38R     RHT     The description of INCHWL is wrong.  Actually, the 
␈↓β                activation character is never included in the string
␈↓β                and is always put into _SKIP_.  (<crlf> puts a <cr> 
␈↓β                into _SKIP_ & throws away the <lf>).

␈↓β24L     RHT     The compiler will not in fact turn division by a power
␈↓β                of two into an ASH.

␈↓β90L     REG     "... See section 19 about these [compilation errors] "
␈↓β                should be section 20.

␈↓β90L     REG     19.1.3 "boundary" is misspelled.

␈↓β41R     RHT     CVSIX left-justifies the sixbit value it builds.

␈↓β43L     RHT     In POINT, it is "a PDP-10 byte pointer".

␈↓β45R     RHT     FORC syntax should be "FORC <identifier> ← ... "

␈↓β57R     RHT     " ... methods of searching the associative store ..."
␈↓β                had "store" missing before.

␈↓β105L    RHT     "omaname" should be "the symbolic name"

␈↓β110L    RHT     added reference:
␈↓β                Harvey, Brian  "Monitor Command Manual" SAILON 54.3
␈↓β                (Dec 1973)
␈↓β                Also, there is a more current SOS manual: SAILON 50.3

␈↓β76L     RHT     Should be "REF_ITEM(VALUE <expression>)"

















␈↓␈↓ εB17␈↓ X